# -*- coding: UTF-8 -*-
import os
from openpyxl import Workbook
from openpyxl import load_workbook
import weight
import head
import height
import file

def readHeightLevel():
    excel_file = "身高体重头围参考表 .xlsx"
    if not os.path.exists(excel_file):
        print("xlsx文件不存在")
        return
    
    file.generateRootDir()

    wb = load_workbook(excel_file)
    for excel_name in wb.sheetnames:
        ws = wb[excel_name]
        if excel_name == '身高标准':
            height.generateHeightLevelCls(ws)
        elif excel_name == '体重标准':
            weight.generateWeightLevelCls(ws)
        elif excel_name == '头围标准':
            head.generateHeadLevelCls(ws)


if __name__ == "__main__":
    readHeightLevel()